var app = {

  //汇总票务信息
  // _sum_ticket_type_by_ticket : ()

  // _to_void_time :(callback) => {
  //   var time = 60;
  //   var time_id = setInterval(res => {
  //     time--;
  //   },1000)
  //   if(time === 0){
  //     clearInterval(time_id);
  //   }
  //   return callback(time);
  // }

  _formate_init_list: function (dataList, callback) { //格式化initList里面table表里面的数据格式
    let tableList = [];
    for (let i = 0; i < dataList.length; i++) {
      const element = dataList[i];
      let state = ''
      let sourceName = ''
      switch (element.state) {
        case 0:
          state = '个人'
          break;
        case 1:
          state = '团体'
          break;
        case 2:
          state = '合作伙伴'
          break;
      }
      switch (element.source) {
        case 1:
          state = '阿里'
          break;
        case 2:
          state = '大麦'
          break;
        case 3:
          state = '赠票'
          break;
      }

      tableList.push({
        orderData: element.createDate + ' ' + state + '\n订单号:' + element.orderCode, //订单
        personlData: element.uName + ' ' + element.uTel + '\n' + element.uIdCard, //个人信息
        companyData: element.company + '\n' + element.scale + '\t' + element.job, //公司信息
        tTypeName: element.tTypeName, //票务信息
        sourceName: sourceName, //来源
        detail: element.detail //备注
      })
    }
    return callback(tableList);
  },


}

//票务 所有模块 工具
export default app;
